home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com
- Newsgroups: comp.lang.c++
- Subject: Re: Using templates in BC++ 4.5
- Date: 24 Jan 1996 02:00:25 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4e43rp$cgb@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe12.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Jan 23, 1996 11:26:21 in article <Using templates in BC++ 4.5>, 'John
- Leonard <leonardj@tribeca.ios.com>' wrote:
-
-
- >I wrote a windows program, in BC++ 4.52, that uses class templates.
- >The template declarations are in a header file and the function
- >definitions are in a cpp file which includes the header file. The cpp
- >file compiled fine, but the project window showed that the code size
- >equaled zero and when I tried to build and link the entire project I got
- >linker error messages that the member functions of the class were
- >undefined. I then changed the code so that the classes weren't templates
- >and the project was built and ran fine. My question is: how can I use
- >class templates in my program?
-
- The simplest way with your system is to have all the template
- code in header files so that the compiler can "see" the
- template definitions whenever it needs them.
- --
- Pete Grant
- Kalevi, Inc.
- Object Oriented Software Development
-